package com.djdg.foodies.admin.base.exception;

/**
 * @Description:
 * @Auther Demon
 * @Date 2018/3/13 14:46 星期二
 */
public class FoodiesException extends RuntimeException {

    public static final int SUCCESS = 0;
    public static final int ERROR = 1;

    private int code;
    private String message;

    public FoodiesException() {
    }

    public FoodiesException(String message) {
        this.code = ERROR;
        this.message = message;
    }

    /**
     * 构造异常类
     * @param code
     * @param message
     */
    public FoodiesException(int code, String message) {
        this.code = code;
        this.message = message;
    }


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
